package com.bupt.secret.dto;

import com.sun.jna.Structure;
import lombok.Data;

import java.util.Arrays;
import java.util.List;

import static com.bupt.secret.constant.BuptConstant.ECCREF_MAX_LEN;
/**
 * @author ShiShuMin
 * @version v1.0
 * @ClassName BuptConstant
 * @Date: 2024/8/26 9:34
 * @Description: ECC公钥结构
 */
@Data
public class ECCrefPublicKey extends Structure {

    /**
     * 密钥位长
     */
    public int bits;

    /**
     * 公钥x坐标
     */
    public byte[] x = new byte[ECCREF_MAX_LEN];

    /**
     * 公钥y坐标
     */
    public byte[] y = new byte[16];

    @Override
    protected List<String> getFieldOrder() {
        return Arrays.asList("bits", "x", "y");
    }
    
}